package com.wcity.manage.common.vo.community.permit;

import org.apache.commons.lang.StringUtils;

import java.util.Date;

/**
 * 社区咨询服务
 * Created by hgg on 2016/12/14.
 */
public class ConsultationVo {

    private Integer id;

    /**
     * 小区ID
     */
    private Integer blockId;

    /**
     * 小区名称
     */
    private String blockName;

    /**
     * 咨询用户ID
     */
    private Integer userId;

    /**
     * 状态（0待回复 1已回复）
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 咨询内容
     */
    private String askIngContent;

    /**
     * 咨询内容（前端页面展示）
     */
    private String showAskIngContent;

    /**
     * 用户昵称
     */
    private String nickname;

    /**
     * 是否有备注（0无备注，>0有备注）
     */
    private Integer hasRemark;

    /**
     * 回复内容
     */
    private String replyContent;

    /**
     * 回复时间
     */
    private Date replyTime;

    public ConsultationVo(Integer id, Integer blockId, String blockName, Integer userId, Integer status, String askIngContent) {
        this.id = id;
        this.blockId = blockId;
        this.blockName = blockName;
        this.userId = userId;
        this.status = status;
        this.askIngContent = askIngContent;
    }

    public ConsultationVo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBlockId() {
        return blockId;
    }

    public void setBlockId(Integer blockId) {
        this.blockId = blockId;
    }

    public String getBlockName() {
        return blockName;
    }

    public void setBlockName(String blockName) {
        this.blockName = blockName;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getAskIngContent() {
        return askIngContent;
    }

    public void setAskIngContent(String askIngContent) {
        this.askIngContent = askIngContent;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getHasRemark() {
        return hasRemark;
    }

    public void setHasRemark(Integer hasRemark) {
        this.hasRemark = hasRemark;
    }

    public String getReplyContent() {
        return replyContent;
    }

    public void setReplyContent(String replyContent) {
        this.replyContent = replyContent;
    }

    public String getShowAskIngContent() {
        showAskIngContent = askIngContent;
        if( StringUtils.isNotBlank( askIngContent ) && askIngContent.length()>15 ){
            showAskIngContent = askIngContent.substring( 0,14 );
        }
        return askIngContent;
    }

    public void setShowAskIngContent(String showAskIngContent) {
        this.showAskIngContent = showAskIngContent;
    }

    public Date getReplyTime() {
        return replyTime;
    }

    public void setReplyTime(Date replyTime) {
        this.replyTime = replyTime;
    }
}
